function getNewContent() {
	if(!document.createElement || !document.createTextNode || !document.getElementById) return false;
	
	let request = getHTTPObject();
	if(request) {
		request.open("GET", "example.txt", true);
		request.onreadystatechange = function() {
			if(request.readyState == 4) {
				alert("Response Received");
				let para = document.createElement("p");
				let txt = document.createTextNode(request.responseText);
				para.appendChild(txt);
				let div = document.getElementById("new");
				div.appendChild(para);
			}
		};
		request.send(null);
	}
	else {
		alert('Sorry, your browser doesn\'t support XMLHttpRequest');
	}
	alert("Function Done");
}

addLoadEvent(getNewContent);